/**
 * @author NLUTZ
 * @version 1
 */

import java.awt.*;//pour la classe image
import javax.swing.*;//pour JPanel, Serializable
import java.io.*;//pour les input/output


public class Photo extends JPanel implements Serializable {
private static final long serialVersionUID = 458452146621558747L;
protected Image photo=null;

	public Photo(){}
	public Photo(Image photo)
	{
		this.photo=photo;
	}
	
	public void setPhoto(Image photo)
	{
		this.photo=photo;
	}
	
	public Image getPhoto()
	{
		return photo;
	}
	
	public void paintComponent(Graphics g)
	{
		super.paintComponent(g);
		if(photo!=null)
		{
			int hauteur=this.getSize().height;
			int largeur=this.getSize().width;
			g.drawImage(photo,0,0,largeur,hauteur,this);
		}
	}
}
